﻿using System.Collections;
using System.Collections.Generic;
using Heap;

namespace AbstractHeap {
    public abstract class AbstractHeap<T> : IHeap<T> {
        public abstract IEnumerator<T> GetEnumerator();
        IEnumerator IEnumerable.GetEnumerator() {
            return GetEnumerator();
        }

        public static AbstractHeap<T> operator +(AbstractHeap<T> heap, T elem) {
            heap.Insert(elem);
            return heap;
        }

        public abstract T FindMin();
        public abstract void ChangeKey(T oldKey, T newKey);
        public abstract void Insert(T item);
        public abstract uint Size();
        public abstract bool IsEmpty();
        public abstract T ExtractMin();
        public abstract void MoveDown(T item);
        public abstract void MoveUp(T item);
        public abstract bool Contains(T item);
    }
}
